package com.ymh.spring.advance.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;

@Configuration
@PropertySource(value = "classpath:dbconnection.properties")
public class DBConnectionConfig {

	@Autowired
	Environment env;

	public int initConnect() {
		int initConnect = env.getProperty("db.init", Integer.class,10);
		return initConnect;
	}

	public int maxConnect() {
		int maxConnect = env.getProperty("db.max", Integer.class);
		return maxConnect;
	}
}
